package Service;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

import Exception.PropertiesException;
import singleton.ConfigPropertiesSingleton;

public class ConfigService {
    
    ConfigPropertiesSingleton config;
    Properties prop;

    public ConfigService() throws PropertiesException {
        try {
            config = ConfigPropertiesSingleton.getConfigProperties();
            prop = config.getProp();
        } catch (FileNotFoundException e) {
            throw new PropertiesException("Fichier introuvable");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    
    public String getPath(){
        return prop.getProperty("path").replace(";", "");
    }
    
    public String getPathDD(){
        return prop.getProperty("pathDD").replace(";", "");
    }
}
